// default package
// Generated 23-mar-2015 17:46:53 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * CrsPerfilEmpleado generated by hbm2java
 */
@Entity
@Table(name = "crs_perfil_empleado", schema = "public", uniqueConstraints = @UniqueConstraint(columnNames = "identificador"))
public class CrsPerfilEmpleado implements java.io.Serializable {

	private int empleadoid;
	private CrsPerfilCentro crsPerfilCentro;
	private Users users;
	private String identificador;

	public CrsPerfilEmpleado() {
	}

	public CrsPerfilEmpleado(CrsPerfilCentro crsPerfilCentro, Users users,
			String identificador) {
		this.crsPerfilCentro = crsPerfilCentro;
		this.users = users;
		this.identificador = identificador;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "users"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "empleadoid", unique = true, nullable = false)
	public int getEmpleadoid() {
		return this.empleadoid;
	}

	public void setEmpleadoid(int empleadoid) {
		this.empleadoid = empleadoid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "centroid", nullable = false)
	public CrsPerfilCentro getCrsPerfilCentro() {
		return this.crsPerfilCentro;
	}

	public void setCrsPerfilCentro(CrsPerfilCentro crsPerfilCentro) {
		this.crsPerfilCentro = crsPerfilCentro;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "identificador", unique = true, nullable = false, length = 80)
	public String getIdentificador() {
		return this.identificador;
	}

	public void setIdentificador(String identificador) {
		this.identificador = identificador;
	}

}
